/**
 * Created by hcadmin on 16/3/11.
 */

define([
    "jquery",
    "IO",
    "UPLOADUI",
    "UPLOAD",
    "jqueryUI",
    "bootbox",
    //"text!/js/biz/keb/activity/definebt.html"
], function ($, IO, upui, up, jui, bootbox, definebt) {



    $(".btn_sub").bind("click",function()
    {


        var form_name = get_form_name( $(this));
        //验证
        if(check_form_info_all(form_name) == false)
            return;

        //改变按钮状态
        $(this).html("提交中...");
        var btn = $(this);

        //发送请求
        ajax_request(form_name,"",function process_data(data){

            //操作成功
            AlertSuccess(bootbox,"操作成功",function(){

                jump('/logout');


            });


        },function process_fail(data){

            //操作失败
            AlertError(bootbox,data.msg,function(){  btn.html("提交"); });



        });

    });





});



